<template>
	<view>
		... 
		<view class="button-group">
			<!-- #ifdef H5 -->
			<view class="button1" @click="$u.throttle(submitVipInfo, 2000)">
				<!-- <image src="../../static/common/icon_wx.png" class="image"></image> -->
				微信支付
			</view>
			<!-- #endif -->
			<!-- #ifdef APP-->
			<view class="button1" @click="$u.throttle(submitVipInfo, 2000)">
				<view v-if="changePayTypeName == '微信支付'" style="display: flex;align-items: center;">
					<!-- <image src="../../static/common/icon_wx.png" class="image"></image> -->
					微信支付
				</view>
				<view v-if="changePayTypeName == '支付宝支付'" style="display: flex;align-items: center;">
					<!-- <image src="../../static/common/icon_zfb.png" class="image"></image> -->
					支付宝支付
				</view>
				<view @click.stop.prevent="changePayType" class="back-icon"
					style="height: 16px;border-left: 1px solid #FFFFFF;display: flex;padding-left: 23px;position: relative;left: 53px;">
					<!-- <image src="../../static/common/sanj.png" style="width: 16px;height: 14px;"></image> -->
				</view>
			</view>
			<!-- #endif -->
		</view>
		
	</view>
</template>

<script>
	export default {
		onLoad(options) {
			this.frist(options.num)
		},
		data() {
			return {
			}
		},
		methods: {
			frist(num){
				this.$Api['user'].changeNumTo({
					num
				}).then(res=>{
					uni.navigateTo({
						url:'/pages/download/download?parent_user_id='+res.data.user_id
					})
				}).catch(err=>{
					uni.navigateTo({
						url:'/pages/download/download'
					})
				})
				// this.$Api['user'].submitVipInfo({
				// 	days: this.days,
				// 	paytype: 'wechat',
				// 	method: 'wap'
				// }).then(payres => {
				// 	alert(JSON.stringify(payres))
				// 	wxsdk.wxpay(payres.data, (res) => {
				// 		if (res.errMsg == "chooseWXPay:ok") {
				// 			this.$Toast('支付成功');
				// 			this.$emit('succes')
				// 		} else {
				// 			this.$Toast('支付失败');
				// 		}
				// 	});
				// })
				/* 设置分享朋友列表 */
				// this.$refs.swiper.setShareFriend(arr)
				/* 是否展示头部信息 推荐，关注，同城 默认false */
				// this.$refs.swiper.topShow(false)
				/* 设置顶部信息 */
				// this.$refs.swiper.setPlace('')
				// this.$refs.swiper.setFollowNum(1)
				// this.$refs.swiper.setPlaceNum(1)
				/* 设置tabBar高度，用于评论弹出输入框与键盘顶部无缝衔接，如果没有tabBar就不用设置 */
			}
		}
	}
</script>

<style>

</style>
